package co.liyao.controller;

import co.liyao.mapper.BizArticleMapper;
import co.liyao.mapper.SysUserMapper;
import co.liyao.model.BizArticle;
import co.liyao.model.BizArticleTags;
import co.liyao.model.BizTags;
import co.liyao.model.SysUser;
import co.liyao.model.vo.BizArticleVo;
import co.liyao.service.BizArticleService;
import co.liyao.service.BizArticleTagService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;

@RestController
public class UserController {
    @Autowired
    private BizArticleService service;

    @RequestMapping("/index1")
    public PageInfo<BizArticle> index(BizArticleVo vo){

        if(vo.getPageNum()==null){
            vo.setPageNum(0);
        }
        return service.FindBizArticlePage(vo);
    }
}
